#include<iostream>
#include<vector>

using namespace std;

int main (int argc, char **argv) { 
vector <int> v;
int sum;
sum=0;
while (1) {
cout << "v[" << v.size() << "]=";
int i;
cin >> i;
if (0==i) break;
v.push_back(i);
sum=sum+i;
}
cout <<"summa=" << sum <<"\n";
return 0;
}
